// 拒绝邀请的理由
import { navigation } from '../../../../../utils/commons'

Page({

    data: {
        msg: '',
        id: '',
        name: '',
        msgId: ''
    },

    onLoad(options) {
        this.setData({
            id: options.id,
            name: options.name,
            msgId: options.msgId
        })
    },

    gotoReject() {
        if (this.data.msg == '') {
            wx.showToast({
                title: '请先输入拒绝理由',
                icon: 'none'
            })
        }
        else {
            console.log('reason msgId', this.data.msgId);
            navigation('../reject/reject?reason=' + this.data.msg + '&id=' + this.data.id + '&msgId=' + this.data.msgId + '&name=' + this.data.name);
        }
    },

    gotoInvitation() {
        navigation('../invitation?idOfPrg=' + this.data.id);
    },

    input(e) {
        this.setData({
            msg: e.detail.value
        })
    }
})